package com.jie.scrollviewwithlistview;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.ListView;

import java.util.ArrayList;
import java.util.List;

public class CommontActivity extends AppCompatActivity {

    private ListView com_lv;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_commont);
        initView();
    }

    private void initView() {
        com_lv = (ListView) findViewById(R.id.com_lv);
        List<String> datas = new ArrayList<>();
        int i = 0;
        while (i < 10) {
            datas.add("这是第" + i++ + "数据");
        }
        MyAdapter adapter = new MyAdapter(datas, this);
        com_lv.setAdapter(adapter);

    }
}
